package com.dj.product.k2faas.entity.function.config;

import com.dj.product.k2faas.entity.function.Function;
import com.dj.product.k2faas.entity.function.dto.FunctionArg;
import com.dj.product.k2faas.entity.function.dto.RequestAccept;
import com.dj.product.k2faas.entity.function.dto.ResponseHeader;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.annotations.Comment;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 丁建 on 2025/9/23 16:41
 *
 * @author 丁建
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@Accessors(chain = true)
public class HttpFunctionConfig extends AbstractFunctionConfig {

    @Comment("方法支持的Content-Type")
    private List<RequestAccept> accepts = new ArrayList<>();

    @Comment("方法调用时的参数列表")
    private List<FunctionArg> functionArgList = new ArrayList<>();

    @Comment("方法返回时的Header")
    private List<ResponseHeader> responseHeaders = new ArrayList<>();

    @Override
    protected Function.FunctionType getType() {
        return Function.FunctionType.HTTP;
    }

}
